<?php if(isset($user)){ echo "U bent al aangemeld"; } else { ?>
<script type="text/javascript">
    function ResetPassword(){
        var email = document.getElementById('user_name').value;
        var message = document.getElementById('message');
        if(email == ''){
            message.value = 'Vul uw e-mail adres in';
            return false;
        }
        else{
            var form = document.getElementById('login_form');
            form.action = "<?php echo base_url(); ?>speler/resetpassword";
            form.submit();

        }
    }
</script>
    
<div class="admin">
	<div class="container">
		<h1>Login</h1>
		<div class="form_wrapper">
            <form id="login_form" method="post" action="<?php echo base_url(); ?>profile/login?url=<?php echo $url ?>">
				<label class="form_label" for="user_name">Username: </label>
				<input class="form_input" type="text" id="user_name" name="email">
				
				<label class="form_label" for="user_name">Password: </label>
				<input class="form_input" type="text" id="user_password" name="wachtwoord">
                <input type="hidden" name="user" value="1" />
				<label for="form_submit_button" class="form_label">&nbsp;</label>
				<input class="form_submit_button" type="submit" id="login_submit">
                <a href="#" onclick="ResetPassword()">Wachtwoord Vergeten</a>
                <div id="message"></div>
			</form>
		</div>
	</div>
</div>	
<?php } ?>